//
//  PayViewModel.h
//  RedWinMall
//
//  Created by HeDianZhao on 2018/8/10.
//  Copyright © 2018年 HeDianZhao. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface PayModel : NSObject

/*
 y:@"appid"]];
 
 PayReq *request = [[PayReq alloc] init];
 //商家向财付通申请的商家id
 request.partnerId = [param objectForKey:@"partnerId"];
 //预支付订单:绑定了我的商品的基本信息 (后台生成的id)
 request.prepayId= [param objectForKey:@"prepayId"];
 //商家根据财付通文档填写的数据和签名 : 微信的标识 意味着是微信支付 不是别的服务
 request.package = [param objectForKey:@"packageValue"];
 //随机串，防重发
 request.nonceStr= [param objectForKey:@"nonceStr"];
 //时间戳，防重发
 UInt32 timeStamp = [[param objectForKey:@"timeStamp"] intValue];
 request.timeStamp = timeStamp;
 //商家根据微信开放平台文档对数据做的签名: 是一种加密方式 所有的支付都需要加密
 request.sign= [param objectForKey:@"sign"];
 **/
@property (copy, nonatomic) NSString *appid;

@property (copy, nonatomic) NSString *partnerId;

@property (copy, nonatomic) NSString *prepayId;

@property (copy, nonatomic) NSString *packageValue;

@property (copy, nonatomic) NSString *nonceStr;

@property (copy, nonatomic) NSString *timeStamp;

@property (copy, nonatomic) NSString *sign;

@end


@interface PayViewModel : NSObject

+ (instancetype)sharePayService;


- (void)AliPayWithSignature:(NSString *)signature;

- (void)WeChatWithModel:(PayModel *)model;

@end




